Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: OpenDoc Class Reference


Appendix A - Shell Plug-In Installation Function

On the Mac OS platform, a shell plug-in is an import library that extends the capabilities of the document shell or adds session-wide functionality to OpenDoc. An OpenDoc document can use a particular shell plug-in only if the import library is located in the OpenDoc Shell Plug-Ins folder on the user's machine when the document is opened. This appendix describes requirements for runtime installation of a shell plug-in on the Mac OS.

An import library is a shared library that is automatically loaded at runtime by the Code Fragment Manager. If you implement a shell plug-in, it must follow the conventions for import libraries; it should have the file type 'shlb'. Your shell plug-in must have an installation function that is an exported entry point. The installation function should install whatever functionality the shell plug-in needs. As is the case for all import libraries, a shell plug-in can optionally have an initialization function and a termination function that are exported as entry points.

When a document is opened, OpenDoc installs all available shell plug-ins. To install a shell plug-in, OpenDoc creates a connection to the import library and executes the shell plug-in's installation function. Specifically, OpenDoc gets a pointer to the ODShellPluginInstall function (page 952) from the import library, casts that pointer to the ODShellPluginInstallProc type (page 951), and calls the function. If installation is successful, OpenDoc then performs any actions requested by the installation function; for example, the function might request OpenDoc to close its connection to the import library. The function uses a value of type ODShellPluginActionCodes (page 950) to specify the desired actions.

For more information about the operation of shell plug-ins and their appropriate location within OpenDoc folders, see the chapter on extending OpenDoc in the OpenDoc Programmer's Guide for the MacOS. For information about import libraries, see the chapter on the Code Fragment Manager in Inside Macintosh: PowerPC System Software.


Appendix Contents
Types and Constants
Programmer-Defined Functions
ODShellPluginInstall

Previous Book Contents Book Index Next

© Apple Computer, Inc.
17 JUL 1996




Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help